<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>simple-panel.html</title>
	
    <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
    <meta http-equiv="description" content="this is my page">
    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
    
    <link rel="stylesheet" type="text/css" href="../../../main/webapp/css/style.css">

<!-- CSS -->  
<link rel="stylesheet" type="text/css" href="http://yui.yahooapis.com/2.3.1/build/container/assets/container.css"/>


<!-- Dependencies -->
<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/yahoo-dom-event/yahoo-dom-event.js"></script>
<!-- Source file -->
<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/container/container-min.js"></script>

<!-- OPTIONAL: Animation (only required if enabling Animation) -->
<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/animation/animation-min.js"></script>

<!-- OPTIONAL: Drag & Drop (only required if enabling Drag & Drop) -->
<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/dragdrop/dragdrop-min.js"></script>

<!-- OPTIONAL: Connection (only required if performing asynchronous submission) -->
<script type="text/javascript" src="http://yui.yahooapis.com/2.3.1/build/connection/connection-min.js"></script>


  </head>
  
  <body onclick="YAHOO.example.container.dialog1.show()">
    This is my HTML page. <br>
<script>
YAHOO.namespace("example.container");

function init() {
	//--
	// Define various event handlers for Dialog
	var handleSubmit = function() {
		this.submit();
	};
	var handleCancel = function() {
		this.cancel();
	};
	var handleSuccess = function(o) {
		var response = o.responseText;
		response = response.split("<!")[0];
		document.getElementById("resp").innerHTML = response;
	};
	var handleFailure = function(o) {
		alert("Submission failed: " + o.status);
	};

	// Instantiate the Dialog
	YAHOO.example.container.dialog1 = new YAHOO.widget.Dialog("dialog1", 
			{ width : "300px",
			  fixedcenter : true,
			  visible : false, 
			  constraintoviewport : true,
			  buttons : [ { text:"Submit", handler:handleSubmit, isDefault:true },
						  { text:"Cancel", handler:handleCancel } ]
			 } );
	

	// Wire up the success and failure handlers
	YAHOO.example.container.dialog1.callback = { success: handleSuccess,
												 failure: handleFailure };
	
	// Render the Dialog
	YAHOO.example.container.dialog1.render();
	
	//--
	/*	
	// Define various event handlers for Dialog
	var handleSubmit = function() {
		this.submit();
	};
	var handleCancel = function() {
		this.cancel();
	};
	var handleSuccess = function(o) {
		var response = o.responseText;
		response = response.split("<!")[0];
		document.getElementById("resp").innerHTML = response;
	};
	var handleFailure = function(o) {
		alert("Submission failed: " + o.status);
	};

	// Instantiate the Dialog
	YAHOO.example.container.dialog1 = new YAHOO.widget.Dialog("dialog1", 
			{ width : "500px",
			  fixedcenter : true,
			  visible : false, 
			  constraintoviewport : true,
			  buttons : [ { text:"Submit", handler:handleSubmit, isDefault:true },
						  { text:"Cancel", handler:handleCancel } ]
			 } );
	
	var myButtons = [ { text:"Submit", handler:handleSubmit, isDefault:true },
				  { text:"Cancel", handler:handleCancel } ];
	YAHOO.example.container.dialog1.cfg.queueProperty("buttons", myButtons);
	YAHOO.example.container.dialog1.cfg.queueProperty("postmethod", "form");
	
	// Wire up the success and failure handlers
	YAHOO.example.container.dialog1.callback = { success: handleSuccess,
												 failure: handleFailure };
	
	// Render the Dialog
	YAHOO.example.container.dialog1.render();
	*/
}

YAHOO.util.Event.onDOMReady(init);
</script>

<div>
<button id="show">Show dialog1</button> 
<button id="hide">Hide dialog1</button>
</div>

<div id="dialog1">
	<div class="modalForm">
		<div class="bd">
		<h2>Flag an Event</h2>
		<form method="POST" action="http://www.map4d.com/edit/flagevent.htm">
	  	<table>
	  		<tr>
	  			<td colspan="2">
	  			Before flagging a item, please review the 
	  			<a href="#" onclick="alert('Not Implemented')">deletion policy</a>   
	  			</td>
	  		</tr>
	  		<tr>
	  			<td class="formLabel" colspan="2">Reason</td>
	  		</tr>
	  		<tr>
	  			<td  colspan="2">
	  				<input type="checkbox" /> It belongs in personal history<br/>	  			
	  				<input type="checkbox" /> It belongs in fictional literature<br/>	  			
	  				<input type="checkbox" /> It is totally fake, just remove it<br/>	  			
				</td>
	  		</tr>
	  		<tr>
	  			<td>Comment</td>
	  			<td>
	  				
	  			</td>
	  		</tr>
	  	</table>
			<input type="submit" value="Submit to Administrators"/>
		</form>
		</div>
	</div>
</div>

<div id="resp">Server response will be displayed in this area</div>	
  </body>
</html>
